﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy.Model.CRM;

using Jzy.DAL.CRM;

using Frame.Lib.Core.Base;
using Frame.Lib.Utilities;

namespace Jzy.BLL.CRM
{
    public class CustomerVisitBO : CommonOperate<CustomerVisitInfo>
    {
        private CustomerVisitDAL _customerVisit;
        protected override BaseDAL DAL
        {
            get
            {
                return _customerVisit;
            }
        }
        public CustomerVisitBO()
        {
            _customerVisit = new CustomerVisitDAL();
        }

        public override CustomerVisitInfo GetInfo(object id)
        {
            CustomerVisitInfo info = base.GetInfo(id);
            info.GetCustomer = customerID => (new CustomerBO()).GetInfo(customerID);
            return info;
        }

        public List<CustomerVisitInfo> GetList(int customerID)
        {
            List<CustomerVisitInfo> list = _customerVisit.GetList(customerID);
            return list;
        }

        public void LogicDelete(string ids)
        {
            List<int> lstIDs = StrUtil.SplitToInt(ids);

            _customerVisit.LogicDelete(lstIDs);
        }
    }
}
